load("//build_defs:cpp_opts.bzl", "COPTS")

cc_library(
    name = "kotlin",
    srcs = ["generator.cc"],
    hdrs = ["generator.h"],
    copts = COPTS,
    strip_include_prefix = "/src",
    visibility = [
        "//pkg:__pkg__",
        "//src/google/protobuf/compiler:__pkg__",
    ],
    deps = [
        ":kotlin_internal",
        "//src/google/protobuf",
        "//src/google/protobuf:port",
        "//src/google/protobuf/compiler:code_generator",
        "//src/google/protobuf/compiler/java",
        "//src/google/protobuf/compiler/java:helpers",
        "//src/google/protobuf/io:printer",
        "@com_google_absl//absl/strings",
    ],
)

cc_library(
    name = "kotlin_internal",
    srcs = [
        "field.cc",
        "file.cc",
        "message.cc",
    ],
    hdrs = [
        "field.h",
        "file.h",
        "message.h",
    ],
    copts = COPTS,
    strip_include_prefix = "/src",
    visibility = [
        "//pkg:__pkg__",
        "//src/google/protobuf/compiler:__pkg__",
    ],
    deps = [
        "//src/google/protobuf",
        "//src/google/protobuf:port",
        "//src/google/protobuf:protobuf_lite",
        "//src/google/protobuf/compiler:code_generator",
        "//src/google/protobuf/compiler/java",
        "//src/google/protobuf/compiler/java:generator_common",
        "//src/google/protobuf/compiler/java:helpers",
        "//src/google/protobuf/compiler/java:internal_helpers",
        "//src/google/protobuf/compiler/java/full:fg",
        "//src/google/protobuf/compiler/java/full:mfg",
        "//src/google/protobuf/compiler/java/lite:field_generators",
        "//src/google/protobuf/io",
        "//src/google/protobuf/io:printer",
        "@com_google_absl//absl/container:btree",
        "@com_google_absl//absl/container:flat_hash_map",
        "@com_google_absl//absl/log:absl_check",
        "@com_google_absl//absl/strings",
    ],
)
